<template>
	<view>
		<view class="section">
			<view class="list">
				<text>头像</text>
				<text class="iconfont">&#xe74b;</text>
				<image :src="myInfor.avat" mode=""></image>
			</view>
			<view class="list" @click="goChangeName">
				<text>名字</text>
				<text class="iconfont">&#xe74b;</text>
				<text>{{myInfor.userName}}</text>
			</view>
			<view class="list">
				<text>微信号</text>
				<text class="iconfont">&#xe74b;</text>
				<text>{{myInfor.account}}</text>
			</view>
			<view class="list">
				<text>更多</text>
				<text class="iconfont">&#xe74b;</text>
			</view>
		</view>
		<view class="section">

			<view class="list">
				<text>我的地址</text>
				<text class="iconfont">&#xe74b;</text>
			</view>
		</view>

	</view>
</template>

<script>
	import util from '../../utils/index.js'
	export default {
		data() {
			return {
				myInfor: {}
			}
		},
		onShow() {
			let {
				uuid
			} = uni.getStorageSync('user')
			util.myRequest({
				url: '/getUserName',
				data: {
					uuid
				}
			}).then(res => {
				this.myInfor = res
			})
		},
		methods: {
			goChangeName() {
				uni.navigateTo({
					url: '../changeName/changeName'
				})
			}
		}
	}
</script>

<style lang="scss">
	page {
		background-color: #ededed;
	}

	.section {
		margin-bottom: 15upx;
		background-color: #fff;

		.list {
			border-bottom: 1px solid #ccc;
			margin-left: 25upx;
			line-height: 100upx;
			font-size: 30upx;

			>image {
				float: right;
				width: 115upx;
				height: 115upx;
				border-radius: 10upx;
				line-height: normal;
				margin-top: 18upx;
			}

			>text:nth-child(2),
			>text:nth-child(3) {
				float: right;
				color: #999;
				margin-left: 20upx;
			}


		}

		&:nth-child(1)>.list:nth-child(1) {
			line-height: 150upx;
		}

	}
</style>
